#include "Searcher.hpp"
#include <iostream>
#include <string>

using namespace ns_search;

const std::string input = "./data/raw_html/raw.txt";
int main()
{
	Searcher* searcher = new Searcher();
	searcher->InitSearch(input);

	std::string json_string;
	while(true){
		std::cout << "请输入查询关键字：" << std::endl;
		
		std::string query;
		// std::cin>>query;
		getline(std::cin, query);

		searcher->Search(query, &json_string);
		std::cout << json_string << std::endl;
	}
	
	return 0;
}